﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using ADShop.Models;
namespace ADShop.Controllers
{
    public class CategoryController : Controller
    {
        //
        // GET: /Category/
        #region "Variable"
        //ADShopEntities adshop = new ADShopEntities();
        EShopEntities1 adshop = new EShopEntities1();
        #endregion
        public ActionResult Index()
        {
            return View();
        }
        
        public ActionResult CatDetails(int id)
        {
            return View(adshop.ImagesProduct.Include("Product").Where(d => d.Product.IDCategory == id).ToList());
        }

        public ActionResult Cat(int id)
        {
            return View(adshop.ImagesProduct.Include("Product").Where(d => d.Product.IDCategory == id).ToList());
        }
    }
}
